﻿
.scroll-indicator {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 51, 102, 0.1);
    z-index: 1025;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--bue-primary), var(--bue-secondary), var(--bue-accent));
    width: 0%;
    transition: width 0.3s ease;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--bue-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

    .skip-link:focus {
        top: 6px;
        color: white;
    }

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.keyboard-navigation *:focus {
    outline: 2px solid var(--bue-accent) !important;
    outline-offset: 2px !important;
}

.offline {
    filter: grayscale(50%);
}

    .offline::before {
        content: 'OFFLINE MODE';
        position: fixed;
        top: 70px;
        right: 20px;
        background: #dc3545;
        color: white;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        z-index: 10000;
    }

.js-error::after {
    content: 'Some features may not work properly';
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffc107;
    color: #212529;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10000;
}

/* Enhanced animations for scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

    .scroll-animate.in-view {
        opacity: 1;
        transform: translateY(0);
    }

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

    .scroll-animate-left.in-view {
        opacity: 1;
        transform: translateX(0);
    }

.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

    .scroll-animate-right.in-view {
        opacity: 1;
        transform: translateX(0);
    }

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

    .scroll-animate-scale.in-view {
        opacity: 1;
        transform: scale(1);
    }

/* Enhanced dark theme support */
[data-theme="dark"] {
    --light-bg: #1a1a1a;
    --dark-text: #ffffff;
    --medium-text: #cccccc;
    --light-text: #999999;
    --light-accent: #333333;
    --secondary-color: #2d2d2d;
}

    [data-theme="dark"] body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: var(--dark-text);
    }

    [data-theme="dark"] .dashboard-card,
    [data-theme="dark"] .stat-card,
    [data-theme="dark"] .quick-action,
    [data-theme="dark"] .event-card,
    [data-theme="dark"] .chart-container {
        background: #2d2d2d;
        border-color: #404040;
        color: var(--dark-text);
    }

    [data-theme="dark"] .sidebar {
        background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
    }

    [data-theme="dark"] .modal-content {
        background: #2d2d2d;
        color: var(--dark-text);
    }

    [data-theme="dark"] .form-control,
    [data-theme="dark"] .form-select {
        background: #404040;
        border-color: #555555;
        color: var(--dark-text);
    }

        [data-theme="dark"] .form-control:focus,
        [data-theme="dark"] .form-select:focus {
            background: #4a4a4a;
            border-color: var(--bue-secondary);
            color: var(--dark-text);
        }

/* Enhanced loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid transparent;
        border-top-color: var(--bue-secondary);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced responsive design */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 0.9rem;
    }

    .bue-logo {
        width: 30px;
        height: 30px;
        font-size: 0.6rem;
    }

    .welcome-title {
        font-size: 1.2rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .card-value {
        font-size: 1.2rem;
    }

    .quick-action {
        padding: 0.75rem 0.5rem;
    }

        .quick-action i {
            font-size: 1.2rem;
        }

        .quick-action .fw-semibold {
            font-size: 0.75rem;
        }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .photo-preview {
        max-width: 120px;
        max-height: 120px;
    }
}

/* Enhanced print styles */
@media print {
    .scroll-indicator,
    .skip-link,
    .face-recognition-loading,
    .face-status,
    #canvas,
    .remove-photo,
    .loading::after {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }

    .dashboard-card,
    .stat-card,
    .event-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .photo-preview {
        max-width: 100px !important;
        max-height: 100px !important;
    }
}

/* Enhanced high contrast mode */
@media (prefers-contrast: high) {
    .dashboard-card,
    .stat-card,
    .quick-action,
    .event-card {
        border: 2px solid var(--dark-text) !important;
    }

    .menu-item:hover {
        background: var(--dark-text) !important;
        color: white !important;
    }

    .face-status {
        border-width: 2px !important;
    }
}

/* Enhanced reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-animate,
    .scroll-animate-left,
    .scroll-animate-right,
    .scroll-animate-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Enhanced focus management */
.modal.show .modal-dialog {
    transform: none;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Enhanced tooltip styles */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background: var(--bue-primary);
    border-radius: 6px;
    padding: 8px 12px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--bue-primary);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: var(--bue-primary);
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: var(--bue-primary);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: var(--bue-primary);
}

/* Enhanced notification styles */
.toast {
    backdrop-filter: blur(10px);
}

.toast-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toast-body {
    background: rgba(255, 255, 255, 0.95);
    color: black;
}

/* Enhanced face detection feedback */
.face-detection-container {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
}

    .face-detection-container.processing {
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.face-detection-container.success {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.5);
}

.face-detection-container.error {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5);
}

/* Enhanced security indicators */
.security-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .security-indicator.insecure {
        background: rgba(220, 53, 69, 0.9);
    }

    .security-indicator i {
        font-size: 14px;
    }

/* Enhanced performance indicators */
.performance-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    z-index: 1000;
    display: none;
}

    .performance-indicator.slow {
        background: rgba(255, 193, 7, 0.9);
        color: #212529;
        display: block;
    }

    .performance-indicator.very-slow {
        background: rgba(220, 53, 69, 0.9);
        display: block;
    }
